﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCLHJiHuaZYUserInfo.ascx.cs" Inherits="Web.Controls.LAIHAN.UCLHJiHuaZYUserInfo" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<script type="text/javascript">
    function UCLHJiHuaZYUserInfo_YongHuHJPress()
    {
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            hidList.Set("YongHuHJ", UCLHJiHuaZYUserInfo_YongHuHJ.GetText());
            
            UCLHJiHuaZYUserInfo_CallBackName.PerformCallback("yonghuhj");
        }
    }
    function UCLHJiHuaZYUserInfo_YongHuHYPress() {
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            hidList.Set("YongHuHY", UCLHJiHuaZYUserInfo_YongHuHY.GetText());
            UCLHJiHuaZYUserInfo_CallBackName.PerformCallback("yonghuhy");
        }
    }
    //function UCLHJiHuaZYUserInfo_LostFocus() {
    //    //debugger;   

    //    //if (UCLHJiHuaZYUserInfo_YongHuHJ.GetText().length == 7) {
            
    //    //}
    //    //else {
    //    //    UCLHJiHuaZYUserInfo_YongHuHJ.SetText("");
    //    //    UCLHBtnBottom_hdCollection.Set("yonghuh", '');
    //    //}
    //}

    function GetYONGHUH()
    {
        return hidList.Get("YongHuHJ");
    }
    function UCLHJiHuaZYUserInfo_YMPress()
    {
        if (event.keyCode == 13) {
            setTimeout(function () {

            }, 0);
            event.preventDefault ? event.preventDefault() : (event.returnValue = false);
            var j = hidList.Get("YongHuHJ");
            var y = hidList.Get("YongHuHY");

            if (j == null || j == undefined||j=="")
            {
                UCLHJiHuaZYUserInfo_YongHuHJ.Focus();
                return;
            }
            else if (y == null || y == undefined || y == "")
            {
                UCLHJiHuaZYUserInfo_YongHuHY.Focus();
                return;
            }
            if (typeof (YM) == "function") {
                YM();
            }
            UCLHJiHuaZYUserInfo_YongHuHJPress();
            UCLHJiHuaZYUserInfo_YongHuHYPress();

        }
    }
    function UCLHJiHuaZYUserInfo_CallbackCommonComplete(rs)
    {
        var arr = rs.split('|');
        var key = arr[0];
        var code = arr[1];
        var msg = arr[2];
        var yhh = arr[3];

        var YongHuM = arr[4];
        var DZ = arr[5];
        var LXR = arr[6];
        var LXDH = arr[7];
        var GLK = arr[8];
        var zhandian = arr[9];
        if (key == "yonghuhj")
        {
            if (code < 0) {
                hidList.Set("JY", "J");
                hidList.Set("YongHuHJ", "");
                UCLHJiHuaZYUserInfo_Clear.onClick();
               
                alert(msg);
                UCLHJiHuaZYUserInfo_YongHuHJ.Focus();
            }
            else {
                //UCLHJiHuaZYUserInfo_SelectUser.onClick();
                UCLHBtnBottom_hdCollection.Set("yonghuh", UCLHJiHuaZYUserInfo_YongHuHJ.GetText());
                UCLHJiHuaZYUserInfo_YHM.SetText(YongHuM);
                UCLHJiHuaZYUserInfo_YHDZ.SetText(DZ);
                UCLHJiHuaZYUserInfo_LXR.SetText(LXR);
                UCLHJiHuaZYUserInfo_LXDH.SetText(LXDH);

                UCLHJiHuaZYUserInfo_YongHuHY.Focus();
                hidList.Set("GLKJ", GLK);
                hidList.Set("ZhanDian", zhandian);
                if (typeof (CheckCaiLiao) == "function")
                {
                    CheckCaiLiao();
                }
                var j = hidList.Get("YongHuHJ");
                var y = hidList.Get("YongHuHY");

                if (j == null || j == undefined || j == "") {
                    UCLHJiHuaZYUserInfo_YongHuHJ.Focus();
                    return;
                }
                else if (y == null || y == undefined || y == "") {
                    UCLHJiHuaZYUserInfo_YongHuHY.Focus();
                    return;
                }
                if (typeof (YM) == "function") {
                    YM();
                }
            }
        }
        if (key == "yonghuhy") {
            if (code < 0) {
                hidList.Set("JY", "Y");
                hidList.Set("YongHuHY","");
                UCLHJiHuaZYUserInfo_Clear.onClick();
               
                alert(msg);
                UCLHJiHuaZYUserInfo_YongHuHY.Focus();

            }
            else {

                hidList.Set("GLKY", GLK);
                hidList.Set("ZhanDian", zhandian);
                UCLHJiHuaZYUserInfo_YHMY.SetText(YongHuM);
                UCLHJiHuaZYUserInfo_YHDZY.SetText(DZ);
                UCLHJiHuaZYUserInfo_LXRY.SetText(LXR);
                UCLHJiHuaZYUserInfo_LXDHY.SetText(LXDH);
                var j = hidList.Get("YongHuHJ");
                var y = hidList.Get("YongHuHY");

                if (j == null || j == undefined || j == "") {
                    UCLHJiHuaZYUserInfo_YongHuHJ.Focus();
                    return;
                }
                else if (y == null || y == undefined || y == "") {
                    UCLHJiHuaZYUserInfo_YongHuHY.Focus();
                    return;
                }
                if (typeof (YM) == "function") {
                    YM();
                }
                //UCLHJiHuaZYUserInfo_SelectUserY.onClick();
            }
        }
    }
</script>
<style type="text/css">
    
</style>

<div style=" display:none">
    <dx:ASPxButton ID="ASPxButton1" ClientInstanceName="UCLHJiHuaZYUserInfo_SelectUser" runat="server" OnClick="Btn_Click" Text="ASPxButton"></dx:ASPxButton>
     <dx:ASPxButton ID="ASPxButton2" ClientInstanceName="UCLHJiHuaZYUserInfo_SelectUserY" runat="server" OnClick="BtnY_Click" Text="ASPxButton"></dx:ASPxButton>
      <dx:ASPxButton ID="ASPxButton3" ClientInstanceName="UCLHJiHuaZYUserInfo_Clear" runat="server" OnClick="BtnClear_Click" Text="ASPxButton"></dx:ASPxButton>

</div>
<dx:ASPxHiddenField ID="UCLHJiHuaZYUserInfo_HiddenList" ClientInstanceName="hidList" runat="server"></dx:ASPxHiddenField>
<dx:ASPxCallback ID="UCLHJiHuaZYUserInfo_CallBack" ClientInstanceName="UCLHJiHuaZYUserInfo_CallBackName" OnCallback="UCLHJiHuaZYUserInfo_CallBackSelect" ClientSideEvents-CallbackComplete="function(s,e){UCLHJiHuaZYUserInfo_CallbackCommonComplete(e.result);}" runat="server"></dx:ASPxCallback>
<fieldset style="border: 1px solid  cornflowerblue;">
    <legend><b>用户信息</b></legend>
    <table style="width: 100%" >
        <tr>
            <td align="right">登记文号：</td>
            <td>
                <dx:ASPxTextBox ID="txtLaiHanBH" runat="server"   ReadOnly="true"   Width="100%"></dx:ASPxTextBox>
            </td>
            <td align="right" style="width: 100px">许可受理号：</td>
            <td>
                <dx:ASPxTextBox ID="txtXuKeSLBH" runat="server" Width="100%" ReadOnly="true"   ></dx:ASPxTextBox>
            </td>
            <td align="right">统一审批编号：</td>
            <td>
                <dx:ASPxTextBox ID="txtTongYiSPBH" runat="server" Width="100%" ReadOnly="true"   ></dx:ASPxTextBox>
            </td>
            <td align="right" style="width: 60px">水量年：</td>
            <td>
                 <asp:HiddenField ID="H_GuanLiKJ" runat="server" />
                <asp:HiddenField ID="H_GuanLiKY" runat="server" />
                <dx:ASPxTextBox ID="txtShuiLiangN" runat="server" Width="100%" ClientSideEvents-KeyPress="function(s,e){UCLHJiHuaZYUserInfo_YMPress();}"></dx:ASPxTextBox>
            </td>

        </tr>
        <tr>
            <td align="right" style="width: 120px">转出用户号（甲）：</td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanChuYHHJ"  AutoPostBack="false"  ClientSideEvents-KeyPress="function(s,e){UCLHJiHuaZYUserInfo_YongHuHJPress();}" ClientInstanceName="UCLHJiHuaZYUserInfo_YongHuHJ" runat="server" Width="100%">
                   
                </dx:ASPxTextBox>
                <asp:HiddenField ID="H_YongHUHJ" runat="server" />
            </td>

            <td align="right" style="width: 120px">转入用户号（乙）：</td>

            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanRuYHHY"   ClientInstanceName="UCLHJiHuaZYUserInfo_YongHuHY" 
                    runat="server" runat="server" Width="100%" 
                    ClientSideEvents-KeyPress="function(s,e){UCLHJiHuaZYUserInfo_YongHuHYPress();}">
                     
                </dx:ASPxTextBox>
                <asp:HiddenField ID="H_YongHUHY" runat="server" />
            </td>

        </tr>
        <tr>
            <td align="right" style="width: 110px">转出用户名（甲）：</td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanChuYHMJ" ClientInstanceName="UCLHJiHuaZYUserInfo_YHM" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>

            <td align="right" style="width: 110px">转入用户名（乙）：</td>

            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanRuYHMY" ClientInstanceName="UCLHJiHuaZYUserInfo_YHMY" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>

        </tr>
        <tr>
            <td align="right" style="width: 110px">转出地址（甲）：</td>
            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanChuDZJ" ClientInstanceName="UCLHJiHuaZYUserInfo_YHDZ" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>

            <td align="right" style="width: 110px">转入地址（乙）：</td>

            <td colspan="3">
                <dx:ASPxTextBox ID="txtZhuanRuDZY" ClientInstanceName="UCLHJiHuaZYUserInfo_YHDZY" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>

        </tr>
        <tr>
            <td align="right">转出联系人（甲）：</td>
            <td>
                <dx:ASPxTextBox ID="txtZhuanChuLXRJ" ClientInstanceName="UCLHJiHuaZYUserInfo_LXR" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>
            <td align="right" style="width: 130px">转出联系电话（甲）：</td>
            <td>
                <dx:ASPxTextBox ID="txtZhuanChuLXDHJ" ClientInstanceName="UCLHJiHuaZYUserInfo_LXDH" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>
            <td align="right">转出联系人（乙）：</td>
            <td>
                <dx:ASPxTextBox ID="txtZhuanRuLXRY"  ClientInstanceName="UCLHJiHuaZYUserInfo_LXRY" runat="server" Width="100%"></dx:ASPxTextBox>
            </td>
            <td align="right" style="width: 130px">转出联系电话（乙）：</td>
            <td>
                <dx:ASPxTextBox ID="txtZhuanRuLXDHY" runat="server"  ClientInstanceName="UCLHJiHuaZYUserInfo_LXDHY" Width="100%"></dx:ASPxTextBox>
            </td>

        </tr>
    </table>
</fieldset>
<br />
